import {BaseModel} from "../core/BaseModel";

module.exports = class extends BaseModel {
    constructor() {
        super();
        this._name = this.tableName('app');
    }

    async getAppByIds(appIds) {
        if (saas.isEmpty(appIds)) {
            return null;
        }
        if (!saas.isArray(appIds)) {
            throw new Error('appIds格式错误，需要为一个数组')
        }
        return await this.mysql(this._name).whereIn('id',appIds);
    }
}